<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'login.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">

      function checkForm(){
          if($("#name").val()==null){
             alert("用户名不能为空！");
             return false;
          }
          else if($("#pwd").val()==null){
             alert("密码不能为空！");
             return false;
          }
          }
</script>
<style type="text/css">

</style>
  </head>
  
  <body>
  <div align="center" style="padding-top:150px">
   <form action="login" method="post" onsubmit="checkForm()" style="width:600px;height: 300px;padding-top:80px">
   账号：<input type="text" id="name" name="username"><br><br>
   密码：<input type="password"  id="pwd" name="userpassword"><br><br>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="登陆"><br>
   </form>
   </div>
  </body>
</html>
